package cn.iocoder.yudao.module.spot.vo;

import cn.iocoder.yudao.module.spot.contant.BigClassIdEnum;
import cn.iocoder.yudao.module.spot.contant.SmallClassIdEnum;
import cn.iocoder.yudao.module.spot.contant.TbsxEnum;
import cn.iocoder.yudao.module.spot.entity.PackEntity;
import com.alibaba.excel.annotation.ExcelProperty;
import org.springframework.beans.BeanUtils;

import java.util.Date;

public class PackVo {
    @ExcelProperty("id")
    private Long id;

    @ExcelProperty("省市县")
    private String ssx; //省市县

    @ExcelProperty("图斑编号")
    private String tbbh; // 图斑编号   query

    @ExcelProperty("中心经度")
    private Double zxjd; // 中心经度

    @ExcelProperty("中心纬度")
    private Double zxwd; // 中心纬度

    @ExcelProperty("图斑大类")
    private String bigclassId; //图斑大类 1:历史遗留矿山 2：有责任主体的废弃矿山 3：其他情形  query

    @ExcelProperty("图斑小类")
    private String smallclassId; //图斑小类   query

    @ExcelProperty("保护地类型")
    private Integer bhdlx; //保护地类型

    @ExcelProperty("保护地级别")
    private Integer bhdjb; //保护地级别

    @ExcelProperty("省市县")
    private String kswz; //矿山位置

    @ExcelProperty("矿山主题编号")
    private String ksztbh; //矿山主题编号

    @ExcelProperty("采矿证号")
    private String licence; //采矿证号

    @ExcelProperty("矿种")
    private String Kzlx; //矿种

    @ExcelProperty("开采方式")
    private String Kcfs; //开采方式

    @ExcelProperty("图斑投影面积")
    private Double tbtymj; //图斑投影面积

    @ExcelProperty("图斑核定面积")
    private Double tbhdmj; //图斑核定面积

    @ExcelProperty("实地治理面积")
    private Double sdzlmj; //实地治理面积

    @ExcelProperty("关闭年度")
    private String gbnd;  //关闭年度

    @ExcelProperty("用地手续")
    private Integer hfyd; //合法用地

    @ExcelProperty("治理情况")
    private Integer zlqk; //恢复治理情况:0、未治理；1、已恢复治理      query

    @ExcelProperty("图斑属性")
    private String tbsx; //图斑属性  query

    @ExcelProperty("所有权权属")
    private Integer owner; //所有权权属,1、国有土地所有权；2、集体土地所有权

    @ExcelProperty("使用权权属")
    private Integer syq; //使用权权属,1、国有土地所有权；2、集体土地所有权；3、其他

    @ExcelProperty("生态问题")
    private Integer stid; //主要生态问题

    @ExcelProperty("修复方式")
    private Integer xffs; //修复方式

    @ExcelProperty("修复时间")
    private Integer xfsj; //拟修复时间段,0、“十四五”期间；1、十四五”之

    @ExcelProperty("复垦义务人")
    private String fkywr;//复垦义务人

    @ExcelProperty("核查单位")
    private String jcdw; //核查单位

    @ExcelProperty("核查人")
    private String hcr; //核查人

    @ExcelProperty("核查日期")
    private Date updatetime; //数据生成时间、核查日期

    @ExcelProperty("备注")
    private String bz; //备注

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSsx() {
        return ssx;
    }

    public void setSsx(String ssx) {
        this.ssx = ssx;
    }

    public String getTbbh() {
        return tbbh;
    }

    public void setTbbh(String tbbh) {
        this.tbbh = tbbh;
    }

    public Double getZxjd() {
        return zxjd;
    }

    public void setZxjd(Double zxjd) {
        this.zxjd = zxjd;
    }

    public Double getZxwd() {
        return zxwd;
    }

    public void setZxwd(Double zxwd) {
        this.zxwd = zxwd;
    }

    public String getBigclassId() {
        return bigclassId;
    }

    public void setBigclassId(String bigclassId) {
        this.bigclassId = bigclassId;
    }

    public String getSmallclassId() {
        return smallclassId;
    }

    public void setSmallclassId(String smallclassId) {
        this.smallclassId = smallclassId;
    }

    public Integer getBhdlx() {
        return bhdlx;
    }

    public void setBhdlx(Integer bhdlx) {
        this.bhdlx = bhdlx;
    }

    public Integer getBhdjb() {
        return bhdjb;
    }

    public void setBhdjb(Integer bhdjb) {
        this.bhdjb = bhdjb;
    }

    public String getKswz() {
        return kswz;
    }

    public void setKswz(String kswz) {
        this.kswz = kswz;
    }

    public String getKsztbh() {
        return ksztbh;
    }

    public void setKsztbh(String ksztbh) {
        this.ksztbh = ksztbh;
    }

    public String getLicence() {
        return licence;
    }

    public void setLicence(String licence) {
        this.licence = licence;
    }

    public String getKzlx() {
        return Kzlx;
    }

    public void setKzlx(String kzlx) {
        Kzlx = kzlx;
    }

    public String getKcfs() {
        return Kcfs;
    }

    public void setKcfs(String kcfs) {
        Kcfs = kcfs;
    }

    public Double getTbtymj() {
        return tbtymj;
    }

    public void setTbtymj(Double tbtymj) {
        this.tbtymj = tbtymj;
    }

    public Double getTbhdmj() {
        return tbhdmj;
    }

    public void setTbhdmj(Double tbhdmj) {
        this.tbhdmj = tbhdmj;
    }

    public Double getSdzlmj() {
        return sdzlmj;
    }

    public void setSdzlmj(Double sdzlmj) {
        this.sdzlmj = sdzlmj;
    }

    public String getGbnd() {
        return gbnd;
    }

    public void setGbnd(String gbnd) {
        this.gbnd = gbnd;
    }

    public Integer getHfyd() {
        return hfyd;
    }

    public void setHfyd(Integer hfyd) {
        this.hfyd = hfyd;
    }

    public Integer getZlqk() {
        return zlqk;
    }

    public void setZlqk(Integer zlqk) {
        this.zlqk = zlqk;
    }

    public String getTbsx() {
        return tbsx;
    }

    public void setTbsx(String tbsx) {
        this.tbsx = tbsx;
    }

    public Integer getOwner() {
        return owner;
    }

    public void setOwner(Integer owner) {
        this.owner = owner;
    }

    public Integer getSyq() {
        return syq;
    }

    public void setSyq(Integer syq) {
        this.syq = syq;
    }

    public Integer getStid() {
        return stid;
    }

    public void setStid(Integer stid) {
        this.stid = stid;
    }

    public Integer getXffs() {
        return xffs;
    }

    public void setXffs(Integer xffs) {
        this.xffs = xffs;
    }

    public Integer getXfsj() {
        return xfsj;
    }

    public void setXfsj(Integer xfsj) {
        this.xfsj = xfsj;
    }

    public String getFkywr() {
        return fkywr;
    }

    public void setFkywr(String fkywr) {
        this.fkywr = fkywr;
    }

    public String getJcdw() {
        return jcdw;
    }

    public void setJcdw(String jcdw) {
        this.jcdw = jcdw;
    }

    public String getHcr() {
        return hcr;
    }

    public void setHcr(String hcr) {
        this.hcr = hcr;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public static PackVo fromPackEntity(PackEntity entity){
        PackVo vo = new PackVo();
        BeanUtils.copyProperties(entity,vo,"smc","dsmc","qxmc","bigclassId");
        if(entity.getBigclassId() != null){
            if(BigClassIdEnum.DEFAULT.getType().equals(entity.getBigclassId())){
                vo.setBigclassId(BigClassIdEnum.DEFAULT.getDesc());
            }else if(BigClassIdEnum.SECOND.getType().equals(entity.getBigclassId())){
                vo.setBigclassId(BigClassIdEnum.SECOND.getDesc());
            }else if(BigClassIdEnum.THIRD.getType().equals(entity.getBigclassId())){
                vo.setBigclassId(BigClassIdEnum.THIRD.getDesc());
            }else {
                vo.setBigclassId(String.valueOf(entity.getBigclassId()));
            }
        }
        if(entity.getSmallclassId() != null){
            if(SmallClassIdEnum.DEFAULT.getType().equals(entity.getSmallclassId())){
                vo.setSmallclassId(SmallClassIdEnum.DEFAULT.getDesc());
            }else if(SmallClassIdEnum.SECOND.getType().equals(entity.getSmallclassId())){
                vo.setSmallclassId(SmallClassIdEnum.SECOND.getDesc());
            }else if(SmallClassIdEnum.THIRD.getType().equals(entity.getSmallclassId())){
                vo.setSmallclassId(SmallClassIdEnum.THIRD.getDesc());
            }else {
                vo.setSmallclassId(String.valueOf(entity.getSmallclassId()));
            }
        }

        if(entity.getTbsx() != null){
            if(TbsxEnum.DEFAULT.getType().equals(entity.getTbsx())){
                vo.setTbsx(TbsxEnum.DEFAULT.getDesc());
            }else if(TbsxEnum.SECOND.getType().equals(entity.getTbsx())){
                vo.setTbsx(TbsxEnum.SECOND.getDesc());
            }else if(TbsxEnum.THIRD.getType().equals(entity.getTbsx())){
                vo.setTbsx(TbsxEnum.THIRD.getDesc());
            }else {
                vo.setTbsx(String.valueOf(entity.getTbsx()));
            }
        }
        return vo;
    }
}
